//
//  LocalMode.swift
//  onemeetingmac
//
//  Created by 张衡 on 2020/6/5.
//  Copyright © 2020 onemeeting. All rights reserved.
//

import Foundation

class UserMode: HandyJSON {
    /*
    ID
    */
    var userId:String?
    
    /*
    举手
    */
    var isHandUp:Bool?
    
    /*
    静音
    */
    var isMute:Bool?
    
    /*
    视频
    */
    var isVdOpen:Bool?
    
    /*
    昵称
    */
    var nickName:String?
    
    required init() {}
}

/*
上麦状态：请求，邀请上麦，强制上麦，预留（主持人用到）
*/
enum UpStatus {
    case request
    case invite
    case `switch`
    case reserved
}


class AdcMode: HandyJSON {
    
    /*
     请求状态
     */
    var status:UpStatus   = .request
    
    /*
     上麦下麦
     */
    var isUp:Bool         = true
    
    
    /*
    ID
    */
    var userId:String?
    
    /*
    举手
    */
    var isHandUp:Bool?
    
    /*
    昵称
    */
    var nickName:String?
    
    required init() {}
}

class MessageMode: HandyJSON {
    var fromUid:String?
    var toUid:String?
    var text:String?
    
    required init() {}
}

struct StreamMode {
    var userId:String!
    var available:Bool = true
    init(userId:String,available:Bool) {
        self.userId = userId
        self.available = available
    }
}
